package com.kube.design.strategy;

/**
 * @author q.zhangr
 * @version 1.0.0
 * @date 2020/7/16
 */
public class StrategyPattern {


    public static void main(String[] args) {


        Context context = new Context();

        Strategy concreteStrategyA = new ConcreteStrategyA();

        context.setStrategy(concreteStrategyA);
        context.strategyMethod();

        System.out.println("---------------------------");

        Strategy concreteStrategyB = new ConcreteStrategyB();
        context.setStrategy(concreteStrategyB);
        context.strategyMethod();

    }

}
